package com.wuhongyu.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.wuhongyu.entity.User;
import com.wuhongyu.service.UserService;

@Controller
public class UserController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping("/userList")
	@ResponseBody
	public List<User> userList() {
		List<User> userList = userService.selectAll();
		PageInfo<User> page = new  PageInfo<User>(userList);
		return userList;
	}

}
